package kr.saeildamil.androidstudy.ch07;

import android.app.Activity;
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.os.Bundle;
import android.view.View;

public class PrePaint extends Activity {
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		MyView1 vw = new MyView1(this);
		setContentView(vw);
	}
	
	class MyView1 extends View{
		Paint mPnt;
		public MyView1(Context context) {
			super(context);
			mPnt = new Paint();
			mPnt.setAntiAlias(true);
			mPnt.setColor(Color.BLUE);
			mPnt.setStrokeWidth(10);
			mPnt.setStyle(Paint.Style.STROKE);
			mPnt.setStrokeJoin(Paint.Join.BEVEL);
		}
		@Override
		protected void onDraw(Canvas canvas) {
			canvas.drawColor(Color.LTGRAY);
			canvas.drawRect(10,10,300,100,mPnt);
		
		}
		

		
		
		
	}
}
